<?php 
namespace app\api\controller;
use think\Db;

class Index
{
    public function index()
    {
        $data = Db::name('room')->where('id', '8')->find();
        return json($data);
    }
}

 ?>